<html xmlns:th="http://www.thymeleaf.org">

<th:block th:fragment="head">
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="author" th:content="${question==null?@environment.getProperty('site.meta.author'):question.user.name+','+@environment.getProperty('site.meta.author')}">
  <meta th:if="${question!=null}" name="keywords" th:content="${question.tag+','+@environment.getProperty('site.meta.keywords')}">
  <meta th:if="${news!=null}" name="keywords" th:content="${news.tag+',资讯,新闻,'+news.columnStr}">
  <meta th:if="${question==null&&news==null}" name="keywords" th:content="${@environment.getProperty('site.meta.keywords')}">
  <meta name="description" th:content="${textDescription==null?@environment.getProperty('site.meta.description'):textDescription}">
  <meta name="Copyright" th:content="${'本页版权归'+@environment.getProperty('site.main.title')+'所有'}">
  <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
  <link rel="stylesheet" href="/layui/css/layui.css">
  <link rel="stylesheet" href="/css/global.css">
  <link rel="stylesheet" href="/css/mylay.css?v=1.36">
  <link rel="stylesheet" href="/css/wap2app.css?v=1.7">
  <link rel="icon" href="/favicon.ico" type="image/x-icon"/>
  <script src="/js/util.js"></script>
  <script src="/js/jquery-3.4.1.min.js"></script>
  <script src="/js/community.js?v=1.4.22" type="application/javascript"></script>
  <script src="/js/sweetalert.min.js"></script>
  <script src="/js/plusShare.js?v=1.7" type="text/javascript" charset="utf-8"></script>
  <script src="/js/wap2app.js?v=1.5.20" type="text/javascript" charset="utf-8"></script>
</th:block>

<div th:fragment="nav" class="fly-header layui-bg-cyan html5plus-hide">
  <div class="layui-container">
    <a class="fly-logo layui-hide-xs" href="/forum" >
      <img src="/images/logo.png" alt="layui" style="height: 40px">
    </a>

      <!--导航针对移动端优化-->
    <a class="fly-logo layui-hide-lg layui-hide-md" href="/forum" >
      <img src="/images/N80.png" alt="layui" style="height: 40px">
    </a>
    <ul class="layui-nav layui-hide-lg layui-hide-md" style="margin-left: 60px">
      <li th:class="${'communitynav' == navtype}? 'layui-nav-item layui-this' : 'layui-nav-item'">
        <a href="/forum"><i class="layui-icon">&#xe68e;</i>主页</a>
      </li>
      <li class="layui-nav-item">
        <a></a>
        <dl class="layui-nav-child">
          <dd><a href="/news"><i class="layui-icon">&#xe705;</i>看看</a></dd>
          <dd><a href="/talk"><i class="iconfont icon-jiaoliu"></i>说说</a></dd>
          <dd><a th:href="${@environment.getProperty('site.info.contactQunUrl')}" target="_blank"><i class="layui-icon">&#xe770;</i>官方群</a></dd>
          <!--dd><a href="/dev"><i class="iconfont icon-iconmingxinganli"></i>实验室</a></dd-->
          <dd><a target="_blank" href="https://gitee.com/yourkevin/NiterForum/"><i><img src="/images/gitee120c.png" style="height: 16px"></i>Gitee</a></dd>
          <dd><a target="_blank" href="https://github.com/yourkevin/NiterForum/"><i><img src="/images/github120c.png" style="height: 16px"></i>Github</a></dd>
          <dd><a target="_blank" href="/doc.html"><i class="layui-icon" style="font-size: 16px; color: #42a0ff;">&#xe655;</i>API文档</a></dd>
          <dd><a target="_blank" href="https://api-1251590924.cos.ap-nanjing.myqcloud.com/qrcode/index.html"><i class="layui-icon" style="font-size: 16px; color: #ffdd11;">&#xe65e;</i>打赏</a></dd>
        </dl>
      </li>
    </ul>

    <ul class="layui-nav fly-nav layui-hide-xs">
      <li th:class="${'communitynav' == navtype}? 'layui-nav-item layui-this' : 'layui-nav-item'">
        <a href="/forum"><i class="layui-icon">&#xe68e;</i>主页</a>
      </li>
      <!--li th:class="${'devnav' == navtype}? 'layui-nav-item layui-this' : 'layui-nav-item'">
        <a href="/dev"><i class="iconfont icon-iconmingxinganli"></i>实验室</a>
      </li-->
      <li th:class="${'talknav' == navtype}? 'layui-nav-item layui-this' : 'layui-nav-item'">
        <a href="/talk"><i class="layui-icon">&#xe63a;</i>说说</a>
      </li>
      <li th:class="${'newsnav' == navtype}? 'layui-nav-item layui-this' : 'layui-nav-item'">
        <a href="/news"><i class="layui-icon">&#xe705;</i>看看</a>
      </li>
      <!--li th:class="${'chatnav' == navtype}? 'layui-nav-item layui-this' : 'layui-nav-item'">
        <a href="/chat"><i class="iconfont icon-jiaoliu"></i>留言</a>
      </li-->
      <li class="layui-nav-item">
        <a href="https://github.com/yourkevin/NiterForum/" target="_blank"><i class="layui-icon">&#xe635;</i>源码</a>
        <dl class="layui-nav-child">
          <dd><a target="_blank" href="https://gitee.com/yourkevin/NiterForum/"><i><img src="/images/gitee120c.png" style="height: 28px"></i>Gitee</a></dd>
          <dd><a target="_blank" href="https://github.com/yourkevin/NiterForum/"><i><img src="/images/github120c.png" style="height: 28px"></i>Github</a></dd>
          <dd><a target="_blank" href="/doc.html"><i class="layui-icon" style="font-size: 30px; color: #42a0ff;">&#xe655;</i>API文档</a></dd>
          <dd><a target="_blank" href="https://api-1251590924.cos.ap-nanjing.myqcloud.com/qrcode/index.html"><i class="layui-icon" style="font-size: 30px; color: #ffdd11;">&#xe65e;</i>打赏</a></dd>
        </dl>
      </li>
      <!--li class="layui-nav-item">
        <a th:href="${@environment.getProperty('site.info.contactQunUrl')}" target="_blank"><i class="layui-icon">&#xe770;</i>联系</a>
      </li-->
    </ul>

    <ul class="layui-nav fly-nav-user">
      <th:block th:if="${loginUser==null}">
      <!-- 未登入的状态 -->
      <li class="layui-nav-item">
        <a class="iconfont icon-touxiang layui-hide-xs" href="/sso/login"></a>
      </li>
      <li class="layui-nav-item">
        <a href="/sso/login">登入</a>
      </li>
      <li class="layui-nav-item">
        <a href="/sso/register">注册</a>
      </li>
      <li class="layui-nav-item layui-hide-xs">
        <a th:href="${'https://graph.qq.com/oauth2.0/authorize?client_id='+@environment.getProperty('qq.client.id')+'&redirect_uri='+@environment.getProperty('qq.redirect.uri')+'&response_type=code&state=1'}" onclick="layer.msg('正在通过QQ登入', {icon:16, shade: 0.1, time:0})" title="QQ登入" class="iconfont icon-qq"></a>
      </li>
      <li class="layui-nav-item layui-hide-xs">
        <a th:href="${'https://api.weibo.com/oauth2/authorize?client_id='+@environment.getProperty('weibo.client.id')+'&redirect_uri='+@environment.getProperty('weibo.redirect.uri')+'&response_type=code&state=1&scope=all'}" onclick="layer.msg('正在通过微博登入', {icon:16, shade: 0.1, time:0})" title="微博登入" class="iconfont icon-weibo"></a>
      </li>
      </th:block>
      <!-- 登入后的状态 -->
    <th:block th:if="${loginUser!=null}">
      <!--li class="layui-nav-item" style="margin-right: 20px">
        <a th:if="${session.unreadCount!=0}" href="/user/message"><span class="layui-hide-xs">有新消息</span><span class="layui-badge" th:text="${session.unreadCount}"></span></a>
      </li-->
      <li class="layui-nav-item" >
        <a class="fly-nav-avatar niter-avatar" href="javascript:;">
          <i th:if="${loginUser.vipRank==1}" class="layui-icon fly-list-kiss layui-hide-xs" title="红砖会员等级：LV1">&#xe735</i>
          <cite th:class="${loginUser.vipRank==1? 'fly-list-kiss':''}" th:text="${loginUser.name}"></cite>
          <!--i class="layui-badge fly-badge-vip layui-bg-gray layui-hide-xs" th:text="${@environment.getProperty('user.group.r'+session.userAccount.groupId)}"></i-->
          <img th:src="${loginUser.avatarUrl}">
        </a>
        <dl class="layui-nav-child">
          <dd><a href="/user/message" class="user-message-menu"><i class="iconfont icon-tongzhi" style="top: 4px;"></i>我的消息</a></dd>
          <dd><a th:href="${'/user/'+loginUser.id}"><i class="layui-icon" style="margin-left: 2px; font-size: 22px;">&#xe68e;</i>我的主页</a></dd>
          <hr style="margin: 5px 0;">
          <dd><a href="/user/p/myPosts"><i class="layui-icon">&#xe62a;</i>帖子管理</a></dd>
          <dd><a href="/user/set/account"><i class="layui-icon">&#xe612;</i>账户中心</a></dd>
          <dd><a href="/user/set/info"><i class="layui-icon">&#xe620;</i>基本设置</a></dd>
          <hr style="margin: 5px 0;">
          <dd><a href="/logout" style="text-align: center;"><i class="layui-icon">&#x1006;</i>退出登录</a></dd>
        </dl>
      </li>
        </th:block>
      
    </ul>
  </div>
</div>

<th:block th:fragment="home_nav">
  <div class="header">
    <div class="header-wrap">
      <h1 class="logo pull-left">
        <a href="/home">
          <img src="/images/home-logo.png" alt="尼特IT-Now ITer" class="logo-img">
          <!--img src="/images/logo-text.png" alt="Now ITer" class="logo-text"-->
        </a>
      </h1>

      <div class="blog-nav pull-right">
        <ul class="layui-nav pull-left">
          <li th:class="${navtype == 'homenav'}? 'layui-nav-item layui-this' : 'layui-nav-item'"><a href="/home">首页</a></li>
          <li th:if="${navtype == 'communitynav'}" class="layui-nav-item layui-this"><a href="#">文章</a></li>
          <li th:class="${navtype == 'msgnav'}? 'layui-nav-item layui-this' : 'layui-nav-item'"><a href="/home/message">留言</a></li>
          <li class="layui-nav-item"><a target="_blank" href="/forum">社区</a></li>
          <li class="layui-nav-item">
            <a target="_blank" href="https://github.com/yourkevin/NiterForum/">源码</a>
            <dl class="layui-nav-child">
              <dd><a target="_blank" href="https://gitee.com/yourkevin/NiterForum/"><i><img src="/images/gitee120c.png" style="height: 28px"></i>Gitee</a></dd>
              <dd><a target="_blank" href="https://github.com/yourkevin/NiterForum/"><i><img src="/images/github120c.png" style="height: 28px"></i>Github</a></dd>
              <dd><a target="_blank" href="/doc.html"><i class="layui-icon" style="font-size: 30px; color: #42a0ff;">&#xe655;</i>API文档</a></dd>
              <dd><a target="_blank" href="https://api-1251590924.cos.ap-nanjing.myqcloud.com/qrcode/index.html"><i class="layui-icon" style="font-size: 30px; color: #ffdd11;">&#xe65e;</i>打赏</a></dd>
            </dl>
          </li>
          <li class="layui-nav-item"><a target="_blank" href="https://jq.qq.com/?_wv=1027&k=5uPXrY2">联系</a></li>
        </ul>
        <a href="#" class="personal pull-left">
          <i class="layui-icon">&#xe66f;<th:block th:if="${loginUser!=null}" th:text="${loginUser.name}"></th:block></i>

        </a>
      </div>
      <div class="mobile-nav pull-right" id="mobile-nav">
        <a href="javascript:;">
          <i class="layui-icon">&#xe671;</i>
        </a>
      </div>
    </div>
    <ul class="pop-nav" id="pop-nav">
      <li th:class="${navtype == 'homenav'}? 'layui-nav-item layui-this' : 'layui-nav-item'"><a href="/home">首页</a></li>
      <li th:class="${navtype == 'msgnav'}? 'layui-nav-item layui-this' : 'layui-nav-item'"><a href="/home/message">留言</a></li>
      <li class="layui-nav-item"><a target="_blank" href="/forum">社区</a></li>
      <li class="layui-nav-item">
        <a target="_blank" href="https://github.com/yourkevin/NiterForum/">源码</a>
      </li>
      <li class="layui-nav-item"><a target="_blank" href="https://jq.qq.com/?_wv=1027&k=5uPXrY2">联系</a></li>
    </ul>
  </div>
</th:block>

<div th:fragment="sub_nav" class="fly-panel fly-column">
  <div class="layui-container">
    <ul class="layui-clear">
      <li th:class="${column == null}? 'layui-this' : ''"><a href="/forum">首页</a></li>
      <li th:class="${column == 1}? 'layui-this' : ''"><a href="/forum?column=1">提问</a></li>
      <li th:class="${column == 2}? 'layui-this' : ''"><a href="/forum?column=2">分享<span class="layui-badge-dot"></span></a></li>
      <li th:class="${column == 3}? 'layui-this' : ''"><a href="/forum?column=3">建议</a></li>
      <li th:class="${column == 4}? 'layui-this' : ''"><a href="/forum?column=4">讨论</a></li>
      <li th:class="${column == 5}? 'layui-this' : ''"><a href="/forum?column=5">公告</a></li>
      <li th:class="${column == 6}? 'layui-this' : ''"><a href="/forum?column=6">动态</a></li>
      <li th:class="${column == 9}? 'layui-this' : ''"><a href="/forum?column=9">其它</a></li>
      <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>

      <!-- 用户登入后显示 -->
      <th:block th:if="${loginUser!=null}">
      <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a target="_blank" href="/user/p/myPosts">我发表的贴</a></li>
      <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a target="_blank" href="/user/p/likes">我收藏的贴</a></li>
      </th:block>
    </ul>

    <div class="fly-column-right layui-hide-xs">
      <span class="fly-search"><i class="layui-icon"></i></span>
      <a href="/p/publish" target="_blank" class="layui-btn">发表新帖</a>
    </div>
    <!--div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
      <a href="/p/publish" target="_blank" class="layui-btn">发表新帖</a>
    </div-->
  </div>
</div>

<div th:fragment="news_nav" class="fly-panel fly-column">
  <div class="layui-container">
    <ul class="layui-clear">
      <li th:class="${column == null||column == 0}? 'layui-this' : ''"><a href="/news">全部</a></li>
      <li th:class="${column == 1}? 'layui-this' : ''"><a href="/news?column=1">互联网</a></li>
      <li th:class="${column == 2}? 'layui-this' : ''"><a href="/news?column=2">科技</a></li>
      <li th:class="${column == 3}? 'layui-this' : ''"><a href="/news?column=3">电脑</a></li>
      <li th:class="${column == 4}? 'layui-this' : ''"><a href="/news?column=4">数码<span class="layui-badge-dot"></span></a></li>
      <li th:class="${column == 5}? 'layui-this' : ''"><a href="/news?column=5">科普</a></li>
      <li th:class="${column == 6}? 'layui-this' : ''"><a href="/news?column=6">体育</a></li>
      <li th:class="${column == 7}? 'layui-this' : ''"><a href="/news?column=7">娱乐</a></li>
      <li th:class="${column == 8}? 'layui-this' : ''"><a href="/news?column=8">国内</a></li>
      <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><span class="fly-mid"></span></li>

      <!-- 用户登入后显示 -->
      <!--th:block th:if="${session.user!=null}">
        <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a target="_blank" href="/user/p/myPosts">我发表的贴</a></li>
        <li class="layui-hide-xs layui-hide-sm layui-show-md-inline-block"><a target="_blank" href="/user/p/likes">我收藏的贴</a></li>
      </th:block-->
    </ul>

    <!--div class="fly-column-right layui-hide-xs">
      <span class="fly-search"><i class="layui-icon"></i></span>
      <a href="/p/publish" target="_blank" class="layui-btn">发表新帖</a>
    </div>
    <div class="layui-hide-sm layui-show-xs-block" style="margin-top: -10px; padding-bottom: 10px; text-align: center;">
      <a href="/p/publish" target="_blank" class="layui-btn">发表新帖</a>
    </div-->
  </div>
</div>

</html>